﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HelperLib
{
   public class CalcMean
   {
      private List<float> values = new List<float>(100);
      public void Add(float item)
      {
         values.Add(item);
      }
      public float Mean()
      {
         float sum = 0;
         for (int i = 0; i < values.Count; i++)
         {
            sum += values[i];
         }
         float count = values.Count;
         values.Clear();
         return sum/count;
      }
   }
}
